package com.qs.home.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 身份证识别结果背面数据
 *
 * @Author ltzz
 * @Date 2019/8/22
 */
public class IdCardBackResultEntity implements Parcelable {
    private Integer signDate;//开始时间
    private Integer expiryDate;//结束时间
    private String issueAuthority;//发证机关

    protected IdCardBackResultEntity(Parcel in) {
        if (in.readByte() == 0) {
            signDate = null;
        } else {
            signDate = in.readInt();
        }
        if (in.readByte() == 0) {
            expiryDate = null;
        } else {
            expiryDate = in.readInt();
        }
        issueAuthority = in.readString();
    }

    public static final Creator<IdCardBackResultEntity> CREATOR = new Creator<IdCardBackResultEntity>() {
        @Override
        public IdCardBackResultEntity createFromParcel(Parcel in) {
            return new IdCardBackResultEntity(in);
        }

        @Override
        public IdCardBackResultEntity[] newArray(int size) {
            return new IdCardBackResultEntity[size];
        }
    };

    public Integer getSignDate() {
        return signDate;
    }

    public void setSignDate(Integer signDate) {
        this.signDate = signDate;
    }

    public Integer getExpiryDate() {
        return expiryDate;
    }

    public void setExpiryDate(Integer expiryDate) {
        this.expiryDate = expiryDate;
    }

    public String getIssueAuthority() {
        return issueAuthority;
    }

    public void setIssueAuthority(String issueAuthority) {
        this.issueAuthority = issueAuthority;
    }

    public IdCardBackResultEntity() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        if (signDate == null) {
            parcel.writeByte((byte) 0);
        } else {
            parcel.writeByte((byte) 1);
            parcel.writeInt(signDate);
        }
        if (expiryDate == null) {
            parcel.writeByte((byte) 0);
        } else {
            parcel.writeByte((byte) 1);
            parcel.writeInt(expiryDate);
        }
        parcel.writeString(issueAuthority);
    }
}
